package com.cd.service.dictionary;

import java.util.List;

import com.cd.bean.Dictionary;

/**
 * 数据字典
 *@Author zhk
 *@Date 2017-12-22
 **/
public interface DictionaryService {

	/**
	 * 新增
	 * @param dic
	 * @throws Exception
	 */
	public void save(Dictionary dic) throws Exception;
	/**
	 * 通过id删除
	 * @param id
	 * @throws Exception
	 */
	public void delete(Integer id) throws Exception;
	/**
	 * 更新
	 * @param dic
	 * @throws Exception
	 */
	public void edit(Dictionary dic) throws Exception;
	/**
	 * 查询列表（全部）
	 * @return list
	 * @throws Exception
	 */
	public List<Dictionary> listAll() throws Exception;
	/**
	 * 通过id获取
	 * @param id
	 * @return dic
	 * @throws Exception
	 */
	public Dictionary findById(Integer id) throws Exception;
	/**
	 * 批量删除
	 * @param id
	 * @throws Exception
	 */
	public void deleteAll() throws Exception;
	/**
	 * 返回记录总数
	 * @return int
	 * @throws Exception
	 */
	public Integer size() throws Exception;
	/**
	 * 返回有限集合（5）
	 * @return
	 * @throws Exception
	 */
	public List<Dictionary> listLimit() throws Exception;
}
